﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace My_TV_Manager.View.ContentPanel.Track
{
    [System.ComponentModel.DesignerCategory("")]

    public class SeriesCategoryPanel : Panel
    {
        private Label titleLabel;
        private Label yearLabel;
        private Label ratingLabel;

        public SeriesCategoryPanel(Size size)
        {
            this.Size = size;

            titleLabel = new Label();
            titleLabel.Text = "Title";
            titleLabel.Font = new Font("Helvetica", 12.0f, FontStyle.Bold);
            titleLabel.TextAlign = ContentAlignment.BottomLeft;
            titleLabel.Left = 5;
            titleLabel.Size = new Size(this.Width / 3 + 45, this.Height - 5);
            this.Controls.Add(titleLabel);

            yearLabel = new Label();
            yearLabel.Text = "Year";
            yearLabel.Font = new Font("Helvetica", 12.0f, FontStyle.Bold);
            yearLabel.TextAlign = ContentAlignment.BottomCenter;
            yearLabel.Left = titleLabel.Location.X + titleLabel.Width;
            yearLabel.Size = new Size(this.Width / 14 + 10, this.Height - 5);
            this.Controls.Add(yearLabel);

            ratingLabel = new Label();
            ratingLabel.Text = "Rating";
            ratingLabel.Font = new Font("Helvetica", 12.0f, FontStyle.Bold);
            ratingLabel.TextAlign = ContentAlignment.BottomCenter;
            ratingLabel.Left = yearLabel.Location.X + yearLabel.Width;
            ratingLabel.Size = new Size(this.Width / 14 + 10, this.Height - 5);
            this.Controls.Add(ratingLabel);
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            e.Graphics.DrawRectangle(new Pen(Color.Black),
                                     new Rectangle(new Point(0, this.Height - 2),
                                                   new Size(this.Width, 1)));
        }
    }
}
